package cn.fanyamin.dao;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.fanyamin.model.Category;

public class CategoryNoDbDao implements CategoryDao {

    @Override
    public List<Category> getAllCategories() {
    	Category cat1 = new Category(1, "Literature");
    	Category cat2 = new Category(1, "Economy");
    	Category cat3 = new Category(1, "Life");
    	Category cat4 = new Category(1, "English");
    	Category cat5 = new Category(1, "Technique");
    	
    	List<Category> list = new ArrayList<Category>(5);
    	list.add(cat1);
    	list.add(cat2);
    	list.add(cat3);
    	list.add(cat4);
    	list.add(cat5);
        return list;
    }

    @Override
    public Map<Integer, Category> getCategoriesMap() {
    	Category cat1 = new Category(1, "Literature");
    	Category cat2 = new Category(1, "Economy");
    	Category cat3 = new Category(1, "Life");
    	Category cat4 = new Category(1, "English");
    	Category cat5 = new Category(1, "Technique");
    	
    	Map<Integer, Category> map = new HashMap<Integer, Category>(5);
    	map.put(1,cat1);
    	map.put(2,cat2);
    	map.put(3,cat3);
    	map.put(4,cat4);
    	map.put(5,cat5);
    	return map;
    }

}
